'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  // 视频练习登录
  router.get('/login', controller.home.login);
  router.post('/login', controller.home.doLogin);
  router.get('/logout', controller.home.logout);
  router.get('/jwt', controller.jwt.index);
  // 自己练习登录功能
  router.post("/dologin",controller.jwt.doLogin);
  router.get("/jwtmessage",controller.jwt.getMessage);
  // 数据持久化 操作数据库
  router.resources("clazz","/clazz",controller.clazz)
  router.resources("student","/student",controller.student)
};
